package com.example.flowable.listener;

import java.util.HashMap;
import java.util.Map;
import lombok.extern.slf4j.Slf4j;
import org.flowable.engine.delegate.DelegateExecution;
import org.flowable.engine.delegate.ExecutionListener;
import org.flowable.task.service.delegate.DelegateTask;
import org.flowable.task.service.delegate.TaskListener;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class HuiqianTaskCreateListener implements TaskListener {
    @Override
    public void notify(DelegateTask delegateTask) {
        log.info("任务监听器create事件");
        // Map<String,Object> map = new HashMap<>();
        // map.put("exetype", "Y");
        // if ((Integer) delegateTask.getVariable("reject") > 0) {
        //     map.put("exetype", "N");
        // }
        // System.out.println("HuiqianEndListener");
        // delegateTask.setVariables(map);
    }
}
